
import { MenuUnfoldOutlined, MenuFoldOutlined } from '@ant-design/icons';
import { Layout } from 'antd';
import React from 'react';

const { Header ,Content} = Layout;

class GlobalHeader extends React.Component {

    state = {
        collapsed: false,
      };

    toggle = () => {
        this.setState({
            collapsed: !this.state.collapsed,
        });
    };
    render() {
        return (
            <Layout className="site-layout">
                <Header className="site-layout-background" style={{ padding: 0 }}>
                    {React.createElement(this.state.collapsed ? MenuUnfoldOutlined : MenuFoldOutlined, {
                        className: 'trigger', onClick: this.toggle,
                    })}
                </Header>
            </Layout>

        )
    }
}


export default GlobalHeader;